#include <lib.h>
#define dfs_remove_file _dfs_remove_file
#include <dfs.h>
#include <string.h>
#include <limits.h>
/*
 * Implementation of the library function for
 * the _dfs_remove_file system call
 */

#if _ANSI
PUBLIC int dfs_remove_file(const char *alias)
#else
PUBLIC int dfs_remove_file(alias)
const char *alias
#endif
{
	int reply, alias_len;
	message m;
	
	/* Set message to be sent */
	m.FILEALIAS = (char *)alias;
	alias_len=strlen(alias);
	if ( alias_len > NAME_MAX || alias_len <= 0 ) return(ERROR);
	m.FILEALIASLEN = alias_len;
	/* Making the call */
	reply = _syscall(DFS,DFS_REMOVE_FROM_LFI,&m);
	/* Return results */
	return reply;
}
